tricky javascript output question